<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="/public/js/jquery.min.js"></script>
		<link href="/public/css/common.css" rel="stylesheet" />
		<link href="/public/css/bootstrap.css" rel="stylesheet" type="text/css" />
		<link href="/public/css/font-awesome.css" rel="stylesheet" />
		<link href="/public/css/main.css" rel="stylesheet" />
		<script src="/public/js/angular.min.js"></script>

	</head>

	<body ng-app='myApp' ng-controller='ctrl'>
		<div id="header">
			<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
				<!-- Indicators -->
				<ol class="carousel-indicators">
					<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
					<li data-target="#carousel-example-generic" data-slide-to="1"></li>
					<li data-target="#carousel-example-generic" data-slide-to="2"></li>
					<li data-target="#carousel-example-generic" data-slide-to="3"></li>
				</ol>

				<!-- Wrapper for slides -->
				<div class="carousel-inner" role="listbox">
					<div class="item active">
						<img src="/public/img/532cfb348f830.jpg" alt="...">
					</div>
					<div class="item" id="banner1">
						<img src="/public/img/54acf8f7a67de.jpg" alt="...">
					</div>
					<div class="item">
						<img src="/public/img/banner1.jpg" alt="...">
					</div>
					<div class="item">
						<img src="/public/img/banner1.jpg" alt="...">
					</div>
				</div>

				<!-- Controls -->
				<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
					<span aria-hidden="true" id="img"><img src="/public/img/箭头 (1).png"/></span>
					<span class="sr-only">Previous</span>
				</a>
				<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
					<span aria-hidden="true" id="img"><img src="/public/img/箭头 (2).png"/></span>
					<span class="sr-only">Next</span>
				</a>
			</div>
		</div>
		<div id="nav">
			<ul id='menu1'>
				{% if category=='' %}
				<li>
					<a href="/" class="focus">首页</a>
				</li>
				{% else %}
				<li>
					<a href="/">首页</a>
				</li>
				{% endif%}
				{% for cate in categories %} {% if category == cate.id%}
				<li>
					<a href="/?category={{cate.id}}" class="focus">{{cate.name}}</a>
				</li>
				{% else%}
				<li>
					<a href="/?category={{cate.id}}">{{cate.name}}</a>
				</li>
				{% endif%} {% endfor %}
			</ul>
		</div>
		<div class="content">
			<div class="container">
				<div class="row">
					<div class="col-lg-2"></div>
					{% block content%}
					{% endblock%}
					<div class="col-lg-4">
						{% if userInfo._id %}
						<div id="userDetial" class="clearfix">
							<div class="title"><b>用户信息</b></div>
							<hr />
							<p class="p2"><span class="span">{{userInfo.username}}</span></p>

							{% if userInfo.isAdmin %}
							<p><span class="span1">你好，管理员</span></p>
							<p class="p3">
								<a href="/admin">进入管理</a>
							</p>

							{% else %}
							<p><span>你好，欢迎光临我的博客！</span></p>
							{% endif %}
							<p id="loginout">
								<a href="javascript:;">退出</a>
							</p>
						</div>
						{% else %}
						<div id="register" class="clearfix">
							<p class='box'></p>
							<div class="title"><b>注册</b></div>
							<hr />
							<input type="text" name="username" placeholder="用户名" /><span>&ensp;用户名：&ensp;</span><br /><br />
							<input type="password" name="password" placeholder="密码" /><span>&ensp;&ensp;&ensp;&ensp;密码：</span><br /><br />
							<input type="password" name="repassword" placeholder="重复密码" /><span>确认密码：</span><br /><br />
							<button type="button" class="btn btn-info">注册</button><br /><br />
							<a href="">马上登录</a><span>已有账户&ensp; </span>
						</div>
						<div id="login" class="clearfix">
							<p class='box'></p>
							<div class="title"><b>登录</b></div>
							<hr />
							<input type="text" name="username" placeholder="用户名" /><span>&ensp;用户名：&ensp;</span><br /><br />
							<input type="password" name="password" placeholder="密码" /><span>&ensp;&ensp;&ensp;&ensp;密码：</span><br /><br />
							<button type="button" class="btn btn-info">登录</button><br /><br />
							<a href="javascript:;">马上注册</a><span>还没账户&ensp; </span>
						</div>

						{% endif %}

						<div id="part">
							<div class="title"><b>社区</b></div>
							<hr />
							<P class="p2">
								<a href="javascript:;">知识天堂</a>
							</P>
							<P class="p2">
								<a href="javascript:;">知识天堂</a>
							</P>
						</div>

					</div>
				</div>

			</div>
		</div>
		<!--<h1>欢迎访问我的博客！</h1>
		<h2>this is a test!!!</h2>-->

		<script src="/public/js/bootstrap.min.js"></script>
		<script src='/public/js/index.js'></script>
		<script src='/public/js/comment.js'></script>
	</body>

</html>